package cn.angis.system.service;

import cn.angis.common.util.TreeUtil;
import cn.angis.db.service.BaseService;
import cn.angis.system.model.Dept;
import org.noear.solon.annotation.ProxyComponent;
import org.sagacity.sqltoy.model.EntityQuery;

import java.util.List;

/**
* 部门表服务
* @author angis.cn
* @Date 2023-01-05
*/
@ProxyComponent
public class DeptService extends BaseService<Dept> {

    public List<Dept> getTreeList() {
        return TreeUtil.listToTree(dao.findEntity(Dept.class, EntityQuery.create()));
    }
}